<!--
 * @Descripttion: 
 * @version: 
 * @Author: EayCome
 * @Date: 2021-02-10 00:09:36
 * @LastEditors: EayCome
 * @LastEditTime: 2021-02-10 11:28:29
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="newInstance.js"></script>
</head>

<body>
    <script>
        function Person(name, age) {
            this.name = name;
            this.age = age;
            // return {
            //     a: 100
            // };
            // return [];
            // return function() {

            // }
            // return 'iloveyou'
        }
        // 调用 newInstance 函数创建对象
        let obj = newInstance(Person, '张三', 18);
        console.log(obj)

        // console.log(new Person());
    </script>
</body>

</html>